using System;
using System.Collections.Generic;
using System.Linq;

namespace AltNetHispano.Vale.Tests.Example
{
	public class AddressCrudService
	{
		private readonly IValidator validator;

		public AddressCrudService(IValidator validator)
		{
			this.validator = validator;
		}

		public IEnumerable<string> Save(Address address)
		{
			var invalidMessage = validator.GetInvalidMessages(address);
			if (!invalidMessage.Any())
			{
				// personRepository.Save(person);
			}
			return invalidMessage;
		}
	}
}